package com.schoolET.controller.admin;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckRole;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.schoolET.entity.vo.OrderFormVO;
import com.schoolET.result.MyPage;
import com.schoolET.result.Result;
import com.schoolET.service.admin.IOrderFormService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 流水表
 * </p>
 *
 * @author le
 * @since 2024-06-03
 */
@Api(tags = "查看交易流水")
@RestController
@RequestMapping("/schoolET")
public class OrderFormController {

    @Resource
    private IOrderFormService orderFormService;

    @ApiOperationSupport(author = "le")
    @ApiOperation(value = "查询流水表交易完成数据")
    @SaCheckLogin
    @SaCheckRole("admin")
    @PostMapping("/water")
    public Result findAll(@Valid @RequestBody OrderFormVO orderFormVo) {
        return Result.success(MyPage.page(orderFormService.selectWater(orderFormVo))).msg("查询成功");
    }

}